import { createSSRApp } from 'vue'
import App from './App.vue'
import * as Pinia from 'pinia';
import Tabbar from "@/components/custom-tabbar/custom-tabbar.vue"
import Navbar from "@/components/custom-navbar/custom-navbar.vue"

import { createUnistorage } from './uni_modules/pinia-plugin-unistorage'

export function createApp() {
  const app = createSSRApp(App)
  const store = Pinia.createPinia()
  
  store.use(createUnistorage())
  app.use(store)
  app.component("tabbar", Tabbar)
  app.component('navbar', Navbar)


  return {
    app,
    Pinia
  }
}